package com.totoro.service.impl;

import com.totoro.mapper.StatisticsMapper;
import com.totoro.pojo.*;
import com.totoro.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author TOTORO
 * @date 2021/7/29 21:25
 */
@Service
public class StatisticsServiceImpl implements StatisticsService {
    @Autowired
    StatisticsMapper statisticsMapper;

    @Override
    public SearchTextList findSeachTextCol(String searchText) {
        return statisticsMapper.findSeachTextCol(searchText);
    }

    @Override
    public Integer addSearchText(SearchTextList searchTextList) {
        return statisticsMapper.addSearchText(searchTextList);
    }

    @Override
    public Integer updateSearchTextCount(int stId) {
        return statisticsMapper.updateSearchTextCount(stId);
    }

    @Override
    public List<UserOnline> findDayUserOnline() {
        return statisticsMapper.findDayUserOnline();
    }

    @Override
    public List<Category> findHotCategoryByBuyCount() {
        return statisticsMapper.findHotCategoryByBuyCount();
    }

    @Override
    public List<Product> findHotCategoryProduct(String cname) {
        return statisticsMapper.findHotCategoryProduct(cname);
    }

    @Override
    public Statistics findAllPriceAndNowPrice() {
        return statisticsMapper.findAllPriceAndNowPrice();
    }

    @Override
    public Integer findAllSellerCount() {
        return statisticsMapper.findAllSellerCount();
    }

    @Override
    public Integer findWeekSellerCount() {
        return statisticsMapper.findWeekSellerCount();
    }

    @Override
    public List<User> findUserByPageAndName(Statistics statistics) {
        return statisticsMapper.findUserByPageAndName(statistics);
    }


}
